<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        // put your code here
            $year = 1;
            $curr_owed = 300000;
            $ann_int = 0.05;
            $yearly_payment = 24000;
            /*while ($year <= 10) {
                
                print "Year $year </br>";
                $year++;
                
                
            }*/
         print "<h1> House Payment Calc. </h1>";
         
                while ($curr_owed > 0) {
                    print "Year $year You owe $curr_owed</br>";
                    $curr_owed = (($curr_owed * $ann_int)+ $curr_owed) - $yearly_payment;
                $year++;}   
                print "Year $year PAID OFF!!!";
        ?>
    </body>
</html>
